package map.data
{
	import flash.geom.Point;
	
	public class BirthPoint extends Point
	{
		public var team:int;
		public function BirthPoint(x:Number=0, y:Number=0, team:int=0)
		{
			super(x, y);
			this.team = team;
		}
		
		override public function equals(toCompare:Point):Boolean
		{
			if(toCompare is BirthPoint)
			{
				return this.team == BirthPoint(toCompare).team && super.equals(toCompare);
			}
			return false;
		}
		
		override public function toString():String
		{
			return "team:"+this.team+
				" x:"+this.x+
				" y:"+this.y;
		}
		
		public static function decode(obj:Object):BirthPoint
		{
			return new BirthPoint(obj.x,obj.y,obj.team);
		}
	}
}